#include int pot = A1; int led = 1; int reading; int PWM; int Vel; SoftwareSerial mySerial (3,4); void setup() { // put your setup code here, to run once: mySerial.begin(9600); } void loop() { // put your main code here, to run repeatedly: reading = analogRead(pot); PWM = map(reading,0,1023,0,255); Vel = map(reading,0,1023,255,0); analogWrite(led,PWM); mySerial.println(Vel); }